$(function(){
	new dialogAnimate('div[name=dialog]', 'div[name=fullscreen]').auto('a[name=submit]', 'a[name=close]');
	
	//点击弹出座位图
	$(".ico-zwt").on('click',function(){
		var fullscreen = $(".bg-full-screen");
		fullscreen.removeClass("m-hide");
		var pop = $(".popup-seat");
		pop.removeClass("m-hide");
		var pic = pop.find("img");
		$(window).on('resize', setPos);
		if(pic.length > 0){
			setPos();
		}
		function setPos() {
		      var l = ($(window).width() - pic[0].width) / 2;
			  var t = ($(window).height() - pic[0].height) / 2;
			  if (t < 0) t = 0;
			  if (l < 0) l = 0;
			  pic.css({'left': l + 'px', 'top': t + 'px'});
		}
		
	    pic.on('click', close)
	    pop.on('click', close);
	    
	    function close() {
	    	fullscreen.addClass("m-hide");
		    pop.addClass("m-hide");
		}
		
	})

})